package net.newsmth.smthapp.android.ui;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import net.newsmth.smthapp.android.R;

/**
 * Created by Hatsune Miku on 3/19/14.
 */
public class TextTestFragment extends Fragment {
    private static  final String POSITION_KEY = "position";

    public static TextTestFragment newInstance(int position) {
        TextTestFragment f = new TextTestFragment();
        Bundle bundle = new Bundle();
        bundle.putInt(POSITION_KEY, position);
        f.setArguments(bundle);

        return f;
    }

    private int position;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        position = getArguments().getInt(POSITION_KEY);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View current = inflater.inflate(R.layout.fragment_text, null);
        TextView textView = (TextView) current.findViewById(R.id.test_text_view);
        textView.setText("Card" + (position + 1));

        return  current;
    }
}
